<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <script>
        //var mouth=prompt("请输入月份")
        // if(mouth>=1 && mouth<=3){
        //     console.log("春季")
        // }else if(mouth>=4 && mouth<=6){
        //     console.log("夏季")
        // }else if(mouth>=7 && mouth<=9){
        //     console.log("秋季")
        // }else if(mouth>=10 && mouth<=12){
        //     console.log("冬季")
        // }
        var monthStr=prompt("请输入月份","例如:10 ");
        var month= Number.parseInt(monthStr)
        switch(month){
        case 3:
        case 4:
        case 5:
            console.log("春季");
            break;
        case 6:
        case 7:
        case 8:
            console.log("夏季");
            break;
        case 9:
        case 10:
        case 11:
            console.log("秋季");
            break;
        case 1:
        case 2:
        case 12:
            console.log("冬季");
            break;
        default :
            console.log("月份有误")
        }
    </script>
</head>
<body>
    
</body>
</html>